package com.guijianpan.system.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.guijianpan.system.domain.Menu;

@Repository
public interface MenuRepository extends CrudRepository<Menu, Long>,
		JpaSpecificationExecutor<Menu> {
	
	@Query("from Menu where pid is null")
	public List<Menu> findFirstLevelMenu();
	
}
